<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<title>
			Document
		</title>
		<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/Bootstrap/Css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/hdjs/hdjs.css"/>
    	<script type="text/javascript" src="<?php echo __PUBLIC__?>/Admin/jquery-1.8.2.min.js"></script>
    	<script type="text/javascript" src="<?php echo __PUBLIC__?>/hdjs/hdjs.min.js"></script>
	</head>
	<body>
		<form onsubmit="return hd_submit(this,'<?php echo U('GoodsLists/edit')?>','<?php echo U('GoodsLists/index',array("gid"=>Q("get.gid")))?>')">
			<div class="alert alert-success">修改货品</div>
		<table class="table table-bordered table-hover">
			<tbody>
				<tr>
					<th width="100">货品ID</th>
					<?php foreach ($NewAttrData as $NewAttrData_v){?>
					<th width="10"><?php echo $NewAttrData_v[0]['taname']?></th>
					<?php }?>
					<th width="10">库存</th>
					<th>货号</th>
				</tr>
				<!-- 如果已添加数目小于可能情况数目，才出现添加货品的输入框 -->
				<tr class="info">
					<td>修改货品</td>
					<?php foreach ($NewAttrData as $NewAttrData_vv){?>
					<td>
						<select name="spec[]" required="">
							<option value="0">-请选择-</option>
								<?php foreach ($NewAttrData_vv as $k=>$New_v){?>
							<option value="<?php echo $New_v['gaid']?>" <?php foreach ($gListsData['combine'] as $vv){?><?php if($New_v['gaid']==$vv){?>
                 selected="" 
               <?php }?><?php }?>><?php echo $New_v['gavalue']?></option>
								<?php }?>
						</select>
					</td>
					<?php }?>
					<td>
						<input type="text" name="artnum" value="<?php echo $gListsData['artnum']?>">
					</td>
					<td>
						<input type="text" name="inventory" value="<?php echo $gListsData['inventory']?>">
					</td>
				</tr>
			</tbody>
		</table>
		<input type="hidden" name="glid" value="<?php echo Q('get.glid',0,'intval')?>"/>
		<input type="hidden" name="goods_lists_gid" value="<?php echo Q('get.gid',0,'intval')?>"/>
		<input type="submit" value="确认修改" class="btn btn-primary btn-block btn-large">
		</form>
	</body>
</html>